Loading TOC...

MarkLogic 9 Product Documentation
PUT /manage/v2/databases/{id|name}/partitions/{name}/properties

Summary

Modify the configuration of the partition identified by {name} in the database identified by {id|name}.

URL Parameters
format The format of the requested data. Can be html, json or xml (default). If present, the format parameter overrides the Accept header.
Request Headers
Accept The expected MIME type of the response. If the format parameter is present, it takes precedence over the Accept header. Supported values: application/xml, application/json.
Content-type The MIME type of the data in the request body. Supported values: application/xml, application/json.
Response Headers
Content-type The MIME type of the data in the response body. Depending upon the value of the format parameter or Accept header, one of application/xml, application/json, or text/html.

Response

Upon success, MarkLogic Server returns a status code 204 (No Content).

Required Privileges

This operation requires the manage-admin role, or the following privilege:

http://marklogic.com/xdmp/privileges/manage-admin

Usage Notes

You can set the property values as follows:

For details, see Common Forest and Partition Operations in the Administrator's Guide.

availability

Availability of the forest data.

updates-allowed

The kinds of updates that should be allowed for this forest.

query-exclusion

Example


$ cat partition-prop.xml
==> 
<partition-properties xmlns="http://marklogic.com/manage">
  <availability>online</availability>
  <updates-allowed>all</updates-allowed>
</partition-properties>

$ cat partition-prop.json
==> 
{
  "availability": "online",
  "updates-allowed": all"
}

$ curl --anyauth --user user:password -X PUT -d @./partition-prop.xml \
    -i -H "Content-type: application/xml" \
    http://localhost:8002/manage/v2/databases/example-db/partitions/2011/properties

==> Set the availability and updates-allowed properties of the partition
    named 2011 of the database example-db. MarkLogic Server responds
    with status code 204 (No Content) and headers similar to the following:

HTTP/1.1 204 No Content
Server: MarkLogic
Content-Length: 0
Connection: Keep-Alive
Keep-Alive: timeout=5
    

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.